<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("components4phpfull/jtsitetheme.inc.php");
use_unit("components4phpfull/jtjavascript.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class vehicle_delete2 extends Page
{
       public $hiddenId = null;


       function vehicle_delete2Create($sender, $params)
       {
       $id = $_GET['veh'];
       $this->hiddenId->setValue($id);

       $result = mysql_query("delete from vehicle_tbl where vehicle_id='".$this->hiddenId->getValue()."'");
       echo "<script type=text/javascript>
        window.opener.location.href='set_vehicle_list.php';
        window.close();
        </script>";
       //redirect('vehicle_list.php');
       }

}

global $application;

global $vehicle_delete2;

//Creates the form
$vehicle_delete2=new vehicle_delete2($application);

//Read from resource file
$vehicle_delete2->loadResource(__FILE__);

//Shows the form
$vehicle_delete2->show();

?>